Hiding options in the Actions menu


You can also change the options your users see in your wiki’s sidebar. If you are a teacher who wants to prevent students from creating a new page on your wiki, you could hide the “New Page” link from them. If you are a non-profit, you might want to hide the “Manage Wiki” link from the visitors to your community site. To do this, you will need to edit your theme. To change your Actions menu:

  1. Edit your theme and go to the bottom half of the theme. Look for the <$WikiActions$> component in your theme. This will be in the body of the theme between the <body> and </body> tags.
  2. Replace <$WikiActions$> with the following code:<!-- <$WikiActions$> -->
    <ul style="font-size: 120%;" class="WikiActions WikiElement">
    <WikiIsEditor><li><a href="<$WikiSpaceUrl$>/space/page"><img width="16" height="16" alt="" src="/i/icon_16_page_add.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/page">New Page</a></li></WikiIsEditor>
    <WikiIsNotSpaceMember><li><a href="<$WikiSpaceUrl$>/space/join"><img width="16" height="16" alt="" src="/i/icon_16_user_add.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/join">Join this Wiki</a></li></WikiIsNotSpaceMember>
    <li><a href="<$WikiSpaceUrl$>/space/changes"><img width="16" height="16" alt="" src="/i/icon_16_date.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/changes">Recent Changes</a></li>
    <li><a href="<$WikiSpaceUrl$>/space/about"><img width="16" height="16" alt="" src="/i/icon_16_gear.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/about">Manage Wiki</a></li>
    <WikiIsSuperUser><li><a href="<$WikiSpaceUrl$>/admin/dashboard"><img width="16" height="16" alt="" src="/i/icon_16_bricks.gif"/></a>
    <a href="<$WikiSpaceUrl$>/admin/dashboard">Site Administration</a></li></WikiIsSuperUser>
    </ul>The <$WikiActions$> code hides the different components in the Actions menu of your sidebar. This replacement code makes those different options explicit so you can edit them individually.
  3. Once you have pasted this code into your theme, you can customize it and specify which users can see the links on your wiki.For instance, if you only want members of your wiki to see the Manage Wiki link, you can add the conditional tag <WikiIsSpaceMember> and </WikiIsSpaceMember> around the Manage Wiki section. In this case,<li><a href="<$WikiSpaceUrl$>/space/about"><img width="16" height="16" alt="" src="/i/icon_16_gear.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/about">Manage Wiki</a></li>gets changed to:
    <WikiIsSpaceMember><li><a href="<$WikiSpaceUrl$>/space/about"><img width="16" height="16" alt="" src="/i/icon_16_gear.gif"/></a>
    <a href="<$WikiSpaceUrl$>/space/about">Manage Wiki</a></li></WikiIsSpaceMember>
  4. Some of our more popular conditional tags are:
    <WikiIsLoggedIn></WikiIsLoggedIn>: This applies to someone who is logged in to their account.
    <WikiIsSpaceMember></WikiIsSpaceMember>: This applies to a user that is logged in and is a member of your wiki.
    <WikiIsSpaceOrganizer></WikiIsSpaceOrganizer>: This applies to a user that is logged in and is an organizer of the wiki.You can find more conditional tags at http://www.wikispaces.com/Themes#toc31.
  5. Once you have changed your theme, you can preview it, and save your changes. Choose the custom theme for your wiki to see the changes.